#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#define STR_LEN 65

char    IntStr[STR_LEN];
int     N = 0;
int     FLAG = 0;
void strmultiply(char* dest, const char* str, int k)
{
    int i = 0;
    int c = 0, m = 0;

    for(i = N-1; i >= 0; i--)
    {
        m = (str[i] - '0') * k + c;
        c = m / 10;
        dest[i] = m % 10 + '0';
    }
}

void printint(const char* srcstr)
{
    int i = 0;
    for(i = 0; i < N; i++)
    {
        printf("%c", srcstr[i]);
    }
}

int comp(const char* str1, const char* str2)
{
    int flag = 0;
    int i = 0, j = 0;
    for(i = 0; i < N; i++)
    {
        j = 0;
        while(str1[j] == str2[(j + i) % N] && j < N)
              j++;
        if(j >= N)
        {
            flag = 1;
            break;
        }
    }

    return flag;
}

void process()
{
    int i = 0;
    char strdest[STR_LEN];

    FLAG = 0;
    for(i = 1; i <= N; i++)
    {
        strmultiply(strdest, IntStr,i);
        if(comp(IntStr, strdest) != 1)
        {
            FLAG = 1;
            break;
        }
    }
    printint(IntStr);
    if(FLAG == 1)
    {
        printf(" is not cyclic\r\n");
    }
    else
    {
        printf(" is cyclic\r\n");
    }
}

int main()
{
    //freopen("bin\\debug\\in.txt", "r", stdin);

    while(scanf("%s", IntStr) != EOF)
    {
        N = strlen(IntStr);

        process();
    }


    return 0;
}
